local PANEL = {}

PANEL.OnClick = nil


function PANEL:Init()
	self.Text = ""
	self.Colour = 50
end

function PANEL:Paint()
	draw.RoundedBox(6,0,0,self:GetWide(), self:GetTall(),Color(168,168,168,255))
	draw.RoundedBox(6,1,1,self:GetWide()-2, self:GetTall()-2,Color(self.Colour,self.Colour,self.Colour,255))
	draw.SimpleText(self.Text, "TabLarge",self:GetWide() / 2, self:GetTall() / 2, Color(250,250,250,255),1,1)
end

function PANEL:OnCursorEntered()
	self.Colour = 90
end

function PANEL:OnCursorExited()
	self.Colour = 50
end

function PANEL:OnMousePressed()
	self.Colour = 130
end

function PANEL:OnMouseReleased()
	self.Colour = 90
	if self.OnClick != nil then
		self.OnClick()
	end
end


vgui.Register( "Stream.Button", PANEL, "DButton" )